#pragma once

#include "ScriptCompiler/AST/ExpressionNode.h"

class CScriptToken;
class CTypeNode;

class CTypeCastNode : public CExpressionNode
{
public:
    CTypeCastNode(std::weak_ptr<CScriptFileContext> InFile)
        : CExpressionNode(InFile, EASTNodeType::TypeCast)
    {
    }

    //left parenthesis
    std::shared_ptr<CScriptToken> LeftParentheses;

    //type
    std::shared_ptr<CTypeNode> Type;

    //expression
    std::shared_ptr<CExpressionNode> Expression;


    virtual void DebugPrint(int32_t InDepth) override;

    virtual std::shared_ptr<CScriptToken> GetFirstToken() override { return LeftParentheses; }
};